<head>
  <body>
    
    <h1>Floto</h1>
    <p>
      This is a photo blogging system.  To install copy the
      entire <code>photo</code> directory a new directory (or use it)
      and visit the install page in a browser
      (e.g. <a href="photos/install.php">photos/install.php</a>).
    </p>

    <p>
      Or type in the name of the new directory and click 'Install'.
      <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
        <input type="text" length="50" name="dir" />
        <input type="submit" value="Install" />
      </form>
    </p>

    <?php
       if ($_POST['dir']) {
         $dir = $_POST['dir'];
         exec('mkdir -p ' . $dir);
         exec('mkdir -p ' . $dir . '/cron');
         exec('cp -R photos/* ' . $dir);
         echo '<p>';
         echo '<b>Run the install page <a href="' . $dir . '/install.php">here</a></b>.';
         echo '</p>';
       }
       ?>

    <p>
      There is also information in the <a href="README">README</a>.
    </p>
    
  </body>
</html>


